﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="backup.aspx.cs" Inherits="He.Web.manage.tools.backup" %>

<%@ Register Src="../_uc/head.ascx" TagPrefix="uc" TagName="head" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>数据库管理</title>
    <uc:head runat="server" ID="uchead" />
</head>
<body style="padding: 10px;">
    <form id="form1" runat="server">
    <div class="navigation">
        <b>您当前的位置：首页 &gt; 系统管理 &gt; 数据库备份</b>
    </div>
    <div class="spClear">
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
        <tr>
            <th colspan="2" align="left">
                当前数据库
            </th>
        </tr>
        <tr>
            <td width="15%" align="right">
                路径：
            </td>
            <td width="85%" align="left">
                <%=DbInfo.FullName %>
            </td>
        </tr>
        <tr>
            <td align="right">
                大小：
            </td>
            <td align="left">
                <%=DbInfo.Length/1024 %>KB
            </td>
        </tr>
        <tr>
            <td align="right">
                最后修改时间：
            </td>
            <td align="left">
                <%=DbInfo.LastWriteTime %>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnBackup" runat="server" Text="备份" CssClass="submit" OnClick="btnBackup_Click" />
            </td>
        </tr>
    </table>
    <%if (BackupDbInfo.Exists)
      {%>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
        <tr>
            <th colspan="2" align="left">
                备份数据库
            </th>
        </tr>
        <tr>
            <td width="15%" align="right">
                路径：
            </td>
            <td width="85%" align="left">
                <%=BackupDbInfo.FullName%>
            </td>
        </tr>
        <tr align="right">
            <td align="right">
                大小：
            </td>
            <td align="left">
                <%=BackupDbInfo.Length/1024%>KB
            </td>
        </tr>
        <tr align="right">
            <td align="right">
                备份时间：
            </td>
            <td align="left">
                <%=BackupDbInfo.LastWriteTime %>
            </td>
        </tr>
        <tr style="display: none">
            <td colspan="2" align="center">
                <asp:Button ID="btnDownload" runat="server" Text="下载" CssClass="submit" OnClick="btnDownload_Click" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnRestore" runat="server" Text="还原" OnClientClick="return confirm('还原将会覆盖当前数据库，确定要继续吗？');"
                    CssClass="submit" OnClick="btnRestore_Click" />
            </td>
        </tr>
    </table>
    <%}%>
    </form>
</body>
</html>
